import request from '@/utils/request'

// 创建表单类型
export function createFormType(data) {
  return request({
    url: '/bpm/form-type/create',
    method: 'post',
    data: data
  })
}

// 更新表单类型
export function updateFormType(data) {
  return request({
    url: '/bpm/form-type/update',
    method: 'put',
    data: data
  })
}

// 删除表单类型
export function deleteFormType(id) {
  return request({
    url: '/bpm/form-type/delete?id=' + id,
    method: 'delete'
  })
}

// 获得表单类型
export function getFormType(id) {
  return request({
    url: '/bpm/form-type/get?id=' + id,
    method: 'get'
  })
}

// 获得表单类型分页
export function getFormTypePage(query) {
  return request({
    url: '/bpm/form-type/page',
    method: 'get',
    params: query
  })
}

// 导出表单类型 Excel
export function exportFormTypeExcel(query) {
  return request({
    url: '/bpm/form-type/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
